OBJ=libkvs.so
CC=gcc
SOCFLAGS=-Wall -fPIC -shared
BINCFLAGS=-Wall -lkvs -lm
SRC=interface.c seg.c sync.c index.c mem_pool.c buddy_system.c 

HEADER=kvs.h
$(OBJ):$(SRC)
	$(CC) $(SOCFLAGS) -o $(OBJ) $(SRC)

install:
	mv $(OBJ) /usr/local/lib/
	cp $(HEADER) /usr/local/include/
	echo "/usr/local/lib" >> /etc/ld.so.conf
	ldconfig
	
uninstall:
	rm /usr/local/lib/$(OBJ)
	rm /usr/local/include/$(HEADER)
